package org.apache.i18n.translater;

import org.apache.i18n.translater.google.GoogleTranslater;
import org.apache.i18n.translater.map.MapTranslater;

public class TranslaterFactory {

	public static Translater createTranslater(String name) {
		if (name.equals(Translater.GOOGLE)) {
			return new GoogleTranslater();
		} else if (name.equals(Translater.MAP)) {
			return new MapTranslater();
		} else {
			throw new IllegalArgumentException("没有对应的" + name + "翻译器");
		}

	}
}
